<template>
	<view class="jc-nav-bar">
		<view class="bar_content">
			<uni-status-bar></uni-status-bar>
			<view class="content">
				<view class="filter" @tap="back">
					<u-icon class='backIcon' name="arrow-left" color="#000000" size="18"></u-icon>
				</view>
				<view class="title">{{title}}</view>
			</view>
		</view>
		
		<!-- 站位 -->
		<view class="home-navbar__placeholder">
			<uni-status-bar />
			<view class="home-navbar__placeholder-view" />
		</view>
	</view>
</template>

<script>
	import uniStatusBar from "@/components/uni-status-bar/uni-status-bar.vue";
	export default{
		name: 'jc-nav-bar',
		components: {
			uniStatusBar
		},
		props:{
			fixed: {
				type: Boolean,
				default: true
			},
			title: {
				type: String,
				default: ''
			}
		},
		data() {
			return {
			}
		},
		methods:{
			back(){
				this.$emit('back')
			},
		}
	}
</script>

<style lang="scss" scoped>
	$bar_content_H : 44px;
	.jc-nav-bar{
		z-index: 9999999;
	}
	.bar_content{
		background-color: #E5E5E5;
		width: 100%;
		position: fixed;
		top: 0;
		z-index: 10;
		.content{
			width: 100%;
			height: $bar_content_H;
			display: flex;
			flex-direction: row;
			align-items: center;
			position: relative;
			.filter{
				display: flex;
				flex-direction: row;
				align-items: center;
				position: absolute;
				padding-left: 20rpx;
			}
			.title{
				color: #000000;
				font-size: 28rpx;
				margin: 0 auto;
			}
		}
	}
	.home-navbar__placeholder{
		width: 100%;
		.home-navbar__placeholder-view{
			width: 100%;
			height: $bar_content_H;
		}
	}
</style>
